function Get-OSChecklist
{

	$computers = Get-Content -path D:\Powershell\OSChecklist_Computers.txt
	If ($computers -ne $Null) {

		foreach ($computer in $computers) {
			#$adapters = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $computer -Filter 'NetConnectionID = "Public VLAN Connection" OR NetConnectionID = "Backup VLAN Connection"'
			$adapters = Get-WmiObject -Class win32_networkadapter -ComputerName $computer
			$computerName = $adapters[0].PSComputerName
			$Timezone = Get-WmiObject -Class win32_TimeZone -ComputerName $computer | Select-Object -ExpandProperty Caption
			$Keyboard = Invoke-Command -ComputerName $computer {[System.Globalization.Cultureinfo]::CurrentCulture | Select-Object -ExpandProperty DisplayName}
			$Domain = Get-WmiObject -Class Win32_ComputerSystem -ComputerName $computer -namespace "root\CIMV2" | Select-Object -ExpandProperty Domain
			$RDP = Get-WMIObject Win32_TerminalServiceSetting  -computername $computer -Namespace ROOT\CIMV2\TerminalServices | Select-Object -ExpandProperty AllowTSConnections
			If ($RDP -eq 1){
				Set-Variable -Name Remote -Value "RDP is Enabled"
			}else {
				Set-Variable -Name Remote -Value "RDP is Disabled"
			}		
			$Page = Get-WmiObject -ComputerName $computer -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile}
			If ($Page -eq 'True'){
				Set-Variable -Name Pagefile -Value "Page file set to automatic"
			}else {
				Set-Variable -Name Pagefile -Value "Not checked to automatic"
			}	
			#$DisableSM = Invoke-Command -ComputerName $computer {reg query "hklm\SOFTWARE\MICROSOFT\SERVERMANAGER" /v "DoNotOpenServerManagerAtLogon"}
			#If ($DisableSM -eq 1){
			#	Set-Variable -Name ServerManager -Value "ServerManager Enabled at logon"
			#}else {
			#	Set-Variable -Name ServerManager -Value "ServerManager Disabled at logon"
			#}
			$Adapter1 = get-wmiobject -ComputerName $computer win32_networkadapter -filter "netconnectionstatus = 2" | Where-Object {$_.netconnectionid -like "Public*"} | Select-Object -ExpandProperty netconnectionid
			if($Adapter1 -eq 'Public VLAN Connection') {
					$PublicNIC = "Configured"
					$PIPVersion4 = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Public VLAN Connection" -DisplayName "Internet Protocol Version 4 (TCP/IPv4)" | Select-Object -ExpandProperty Enabled}
			If ($PIPVersion4 -eq 'True'){
				Set-Variable -Name PIPV4 -Value "Enabled"
			}else {
				Set-Variable -Name PIPV4 -Value "Disabled"
			}
			$PCFMN = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Public VLAN Connection" -DisplayName "Client for Microsoft Networks" | Select-Object -ExpandProperty Enabled}
			If ($PCFMN -eq 'True'){
				Set-Variable -Name PCFMSN -Value "Enabled"
			}else {
				Set-Variable -Name PCFMSN -Value "Disabled"
			}
			$PFAPSFMN = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Public VLAN Connection" -DisplayName "File and Printer Sharing for Microsoft Networks" | Select-Object -ExpandProperty Enabled}
			If ($PFAPSFMN -eq 'True'){
				Set-Variable -Name PFAPSFMSN -Value "Enabled"
			}else {
				Set-Variable -Name PFAPSFMSN -Value "Disabled"
			}
			$PIPVersion6 = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Public VLAN Connection" -DisplayName "Internet Protocol Version 6 (TCP/IPv6)" | Select-Object -ExpandProperty Enabled}
			If ($PIPVersion6 -eq 'True'){
				Set-Variable -Name PIPV6 -Value "Enabled"
			}else {
				Set-Variable -Name PIPV6 -Value "Disabled"
			}
			} else {
					$PublicNIC = "In Correct"
					$PIPV4 = "Adapter Name is wrong"
					$PCFMSN = "Adapter Name is wrong"
					$PFAPSFMSN = "Adapter Name is wrong"
					$PIPV6 = "Adapter Name is wrong"
			}
			$Adapter2 = get-wmiobject -ComputerName $computer win32_networkadapter -filter "netconnectionstatus = 2" | Where-Object {$_.netconnectionid -like "Backup*"} | Select-Object -ExpandProperty netconnectionid
			if($Adapter2 -eq 'Backup VLAN Connection') {
					$BackupNIC = "Configured"
					$BIPVersion4 = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Backup VLAN Connection" -DisplayName "Internet Protocol Version 4 (TCP/IPv4)" | Select-Object -ExpandProperty Enabled}
			If ($BIPVersion4 -eq 'True'){
				Set-Variable -Name BIPV4 -Value "Enabled"
			}else {
				Set-Variable -Name BIPV4 -Value "Disabled"
			}
			$BCFMN = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Backup VLAN Connection" -DisplayName "Client for Microsoft Networks" | Select-Object -ExpandProperty Enabled}
			If ($BCFMN -eq 'True'){
				Set-Variable -Name BCFMSN -Value "Enabled"
			}else {
				Set-Variable -Name BCFMSN -Value "Disabled"
			}
			$BFAPSFMN = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Backup VLAN Connection" -DisplayName "File and Printer Sharing for Microsoft Networks" | Select-Object -ExpandProperty Enabled}
			If ($BFAPSFMN -eq 'True'){
				Set-Variable -Name BFAPSFMSN -Value "Enabled"
			}else {
				Set-Variable -Name BFAPSFMSN -Value "Disabled"
			}
			$BIPVersion6 = Invoke-Command -ComputerName $computer {Get-NetAdapterBinding -Name "Backup VLAN Connection" -DisplayName "Internet Protocol Version 6 (TCP/IPv6)" | Select-Object -ExpandProperty Enabled}
			If ($BIPVersion6 -eq 'True'){
				Set-Variable -Name BIPV6 -Value "Enabled"
			}else {
				Set-Variable -Name BIPV6 -Value "Disabled"
			}
			} else {
					$BackupNIC = "In Correct"
					$BIPV4 = "Adapter Name is wrong"
					$BCFMSN = "Adapter Name is wrong"
					$BFAPSFMSN = "Adapter Name is wrong"
					$BIPV6 = "Adapter Name is wrong"
			}
			$CPU = Get-WmiObject -computername $computer Win32_ComputerSystem | Select-Object -ExpandProperty NumberofProcessors
			$RAM = get-wmiobject -class "Win32_ComputerSystem" -namespace "root\CIMV2" -computername $computer
			foreach ($Mem in $RAM){
				$Memory = [math]::round($Mem.TotalPhysicalMemory/1024/1024/1024, 0)
			}
			$c = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "C:*"} | Select -Expand Size
			if ($c -eq $Null) {
				$cdrive = "No OS Installed"
			}else {
				$cdrive = [math]::round($c/1024/1024/1024, 0)
			}
			$d = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "D:*"} | Select -Expand Size
			if ($d -eq $Null) {
				$ddrive = "Not Partitioned"
			}else {
				$ddrive = [math]::round($d/1024/1024/1024, 0)
			}
			$e = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "E:*"} | Select -Expand Size
			if ($e -eq $Null) {
				$edrive = "Not Partitioned"
			}else {
				$edrive = [math]::round($e/1024/1024/1024, 0)
			}
			$f = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "F:*"} | Select -Expand Size
			if ($f -eq $Null) {
				$fdrive = "Not Partitioned"
			}else {
				$fdrive = [math]::round($f/1024/1024/1024, 0)
			}
			$g = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "G:*"} | Select -Expand Size
			if ($g -eq $Null) {
				$gdrive = "Not Partitioned"
			}else {
				$gdrive = [math]::round($g/1024/1024/1024, 0)
			}	
			$h = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "H:*"} | Select -Expand Size
			if ($h -eq $Null) {
				$hdrive = "Not Partitioned"
			}else {
				$hdrive = [math]::round($h/1024/1024/1024, 0)
			}
			$i = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "I:*"} | Select -Expand Size
			if ($i -eq $Null) {
				$idrive = "Not Partitioned"
			}else {
				$idrive = [math]::round($i/1024/1024/1024, 0)
			}
			$j = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "J:*"} | Select -Expand Size
			if ($j -eq $Null) {
				$jdrive = "Not Partitioned"
			}else {
				$jdrive = [math]::round($j/1024/1024/1024, 0)
			}
			$k = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "K:*"} | Select -Expand Size
			if ($k -eq $Null) {
				$kdrive = "Not Partitioned"
			}else {
				$kdrive = [math]::round($k/1024/1024/1024, 0)
			}
			$l = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "L:*"} | Select -Expand Size
			if ($l -eq $Null) {
				$ldrive = "Not Partitioned"
			}else {
				$ldrive = [math]::round($l/1024/1024/1024, 0)
			}
			$m = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "M:*"} | Select -Expand Size
			if ($m -eq $Null) {
				$mdrive = "Not Partitioned"
			}else {
				$mdrive = [math]::round($m/1024/1024/1024, 0)
			}
			$n = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "N:*"} | Select -Expand Size
			if ($n -eq $Null) {
				$ndrive = "Not Partitioned"
			}else {
				$ndrive = [math]::round($n/1024/1024/1024, 0)
			}
			$o = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "O:*"} | Select -Expand Size
			if ($o -eq $Null) {
				$odrive = "Not Partitioned"
			}else {
				$odrive = [math]::round($o/1024/1024/1024, 0)
			}
			$p = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "P:*"} | Select -Expand Size
			if ($p -eq $Null) {
				$pdrive = "Not Partitioned"
			}else {
				$pdrive = [math]::round($p/1024/1024/1024, 0)
			}
			$q = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "Q:*"} | Select -Expand Size
			if ($q -eq $Null) {
				$qdrive = "Not Partitioned"
			}else {
				$qdrive = [math]::round($q/1024/1024/1024, 0)
			}
			$r = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "R:*"} | Select -Expand Size
			if ($r -eq $Null) {
				$rdrive = "Not Partitioned"
			}else {
				$rdrive = [math]::round($r/1024/1024/1024, 0)
			}
			$s = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "S:*"} | Select -Expand Size
			if ($s -eq $Null) {
				$sdrive = "Not Partitioned"
			}else {
				$sdrive = [math]::round($s/1024/1024/1024, 0)
			}
			$t = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "T:*"} | Select -Expand Size
			if ($t -eq $Null) {
				$tdrive = "Not Partitioned"
			}else {
				$tdrive = [math]::round($t/1024/1024/1024, 0)
			}
			$u = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "U:*"} | Select -Expand Size
			if ($u -eq $Null) {
				$udrive = "Not Partitioned"
			}else {
				$udrive = [math]::round($u/1024/1024/1024, 0)
			}
			$v = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "V:*"} | Select -Expand Size
			if ($v -eq $Null) {
				$vdrive = "Not Partitioned"
			}else {
				$vdrive = [math]::round($v/1024/1024/1024, 0)
			}
			$w = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "W:*"} | Select -Expand Size
			if ($w -eq $Null) {
				$wdrive = "Not Partitioned"
			}else {
				$wdrive = [math]::round($w/1024/1024/1024, 0)
			}
			$x = Get-WmiObject Win32_logicaldisk -ComputerName $computer | Where-Object { $_.DeviceID -Like "X:*"} | Select -Expand Size
			if ($x -eq $Null) {
				$xdrive = "Not Partitioned"
			}else {
				$xdrive = [math]::round($x/1024/1024/1024, 0)
			}
			$PublicIP = Get-WMIObject Win32_NetworkAdapterConfiguration -computername $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -Like "10*"} | Select -Expand IPAddress
			$DefaultGateway = Get-WMIObject Win32_NetworkAdapterConfiguration -computername $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -Like "10*"} | Select -Expand DefaultIPGateway
			$BackupIP = Get-WMIObject Win32_NetworkAdapterConfiguration -computername $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -NotLike "10*"} | Select -Expand IPAddress
			
			try {
					$Networks = Get-WmiObject -Class Win32_NetworkAdapterConfiguration `
								-Filter IPEnabled=TRUE `
								-ComputerName $Computer `
								-ErrorAction Stop
			} catch {
					Write-Verbose "Failed to Query $Computer. Error details: $_"
					continue
			}
			foreach($Network in $Networks) {
				$DNSServers = $Network.DNSServerSearchOrder
				If(!$DNSServers) {
					$PrimaryDNSServer = "Notset"
					$SecondaryDNSServer = "Notset"
				} elseif($DNSServers.count -eq 1) {
					$PrimaryDNSServer = $DNSServers[0]
					$SecondaryDNSServer = "Notset"
				} else {
					$PrimaryDNSServer = $DNSServers[0]
					$SecondaryDNSServer = $DNSServers[1]
				}
			}
			
			$WINSPrimary = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -Like "10*"} | Select-Object -ExpandProperty WINSPrimaryServer
			$WINSSecondary = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -Like "10*"} | Select-Object -ExpandProperty WINSSecondaryServer
					
			$FirstRoutes = get-wmiobject -class "Win32_IP4PersistedRouteTable" -ComputerName $computer -namespace "root\CIMV2" | Where-Object { $_.Name -like "10.129*"} | Select-Object -ExpandProperty Name
			If ($FirstRoutes -eq $Null){
					$FirstRoute = "No Routes"
			} else {
					$FirstRoute = $FirstRoutes
			}		
			$SecondRoutes = get-wmiobject -class "Win32_IP4PersistedRouteTable" -ComputerName $computer -namespace "root\CIMV2" | Where-Object { $_.Name -like "10.142*"} | Select-Object -ExpandProperty Name
			If ($SecondRoutes -eq $Null){
					$SecondRoute = "No Routes"
			} else {
					$SecondRoute = $SecondRoutes
			}	
			$SCSI = Get-WmiObject Win32_SCSIController -Computername $computer | Where-Object { $_.Manufacturer -Like "VMWare*"} | Select-Object -ExpandProperty Drivername
			if($SCSI -eq 'pvscsi') {
					$SCSIControllers = "PVSCSI"
			} else {
					$SCSIControllers = "Non-PVSCSI"
			}
			
			$PublicNICDriver = Get-WMIObject Win32_NetworkAdapterConfiguration -computername $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -Like "10*"} | Select -Expand Servicename
			$BackupNICDriver = Get-WMIObject Win32_NetworkAdapterConfiguration -computername $computer -Filter IPEnabled=TRUE | Where-Object { $_.DefaultIPGateway -NotLike "10*"} | Select -Expand Servicename
			$VMWare = Get-WmiObject Win32Reg_AddRemovePrograms -ComputerName $computer | Where-Object { $_.DisplayName -Like "VMWare Tools*"} | Select-Object -ExpandProperty Version
			
			$SMS = Get-Service "SMS Agent Host" -ComputerName $computer | Select-Object -ExpandProperty status
			
			$properties = @{
				'ComputerName'= $computerName
				'Domain' = $Domain
				'Timezone' = $Timezone
				'RemoteDesktop' = $Remote
				'Pagefile settings' = $Pagefile
				#'ServerManager' = $ServerManager
				'Public Adapter Name' = $PublicNIC
				'Backup Adapter Name' = $BackupNIC
				#'LocalAdmins' = $LocalAdmins
				'PublicIP' = $PublicIP
				'DefaultGateway' = $DefaultGateway
				'BackupIP' = $BackupIP
				'PrimaryDNSServer' = $PrimaryDNSServer
				'SecondaryDNSServer' = $SecondaryDNSServer
				'PrimaryWINSServer' = $WINSPrimary
				'SecondaryWINSServer' = $WINSSecondary
				'Public:IPv4' = $PIPV4
				'Public:Client for MS' = $PCFMSN
				'Public:Filen_n_Printer Sharing' = $PFAPSFMSN
				'Public:IPv6' = $PIPV6
				'Backup:IPv4' = $BIPV4
				'Backup:Client for MS' = $BCFMSN
				'Backup:File_n_Printer Sharing' = $BFAPSFMSN
				'Backup:IPv6' = $BIPV6
				'PresistenceRoute1' = $FirstRoute
				'PresistenceRoute2' = $SecondRoute
				'SCSIControllers' = $SCSIControllers
				'PublicNICDriver' = $PublicNICDriver
				'BackupNICDriver' = $BackupNICDriver
				'CPU' = $CPU
				'RAM' = $Memory
				'Keyboard' = $Keyboard
				'VMWare Version' = $VMWare
				'SMS Agent' = $SMS
				'C:Drive' = $cdrive
				'D:Drive' = $ddrive
				'E:Drive' = $edrive
				'F:Drive' = $fdrive
				'G:Drive' = $gdrive
				'H:Drive' = $hdrive
				'I:Drive' = $idrive
				'J:Drive' = $jdrive
				'K:Drive' = $kdrive
				'L:Drive' = $ldrive
				'M:Drive' = $mdrive
				'N:Drive' = $ndrive
				'O:Drive' = $odrive
				'P:Drive' = $pdrive
				'Q:Drive' = $qdrive
				'R:Drive' = $rdrive
				'S:Drive' = $sdrive
				'T:Drive' = $tdrive
				'U:Drive' = $udrive
				'V:Drive' = $vdrive
				'W:Drive' = $wdrive
				'X:Drive' = $xdrive
			}
		
			$Output = New-Object -TypeName psobject -Property $properties | Select-Object ComputerName,Domain,Timezone,Keyboard,RemoteDesktop,`
			"Pagefile settings","Public Adapter Name","Backup Adapter Name",PublicIP,DefaultGateway,BackupIP,PrimaryDNSServer,SecondaryDNSServer,`
			PrimaryWINSServer,SecondaryWINSServer,PresistenceRoute1,PresistenceRoute2,SCSIControllers,PublicNICDriver,BackupNICDriver,"VMWare Version","SMS Agent",`
			Public:IPv4,"Public:Client for MS","Public:Filen_n_Printer Sharing",Public:IPv6,Backup:IPv4,"Backup:Client for MS","Backup:File_n_Printer Sharing",Backup:IPv6,CPU,RAM,`
			C:Drive,D:Drive,E:Drive,F:Drive,G:Drive,H:Drive,I:Drive,J:Drive,K:Drive,L:Drive,M:Drive,N:Drive,O:Drive,P:Drive,Q:Drive,R:Drive,S:Drive,T:Drive,U:Drive,V:Drive,W:Drive,X:Drive
			Write-Output $Output
		}
	} else {
		write-host "Pre-requisite is not in place" -ForegroundColor Red
	}
}